<?php

include_once('ConnectionManager.php');

function countRecordIntroduction() {
    $query1 = "SELECT COUNT(INT_ID) AS NUMINS FROM INTRODUCTION";
    ConnectionManager::getInstance()->setQuery($query1);
    return ConnectionManager::getInstance()->query();
}

function countRecordUser() {
    $query2 = "SELECT COUNT(USER_ID) AS NUMUSER FROM USER WHERE USER_USERNAME NOT LIKE (SELECT USER_USERNAME FROM USER WHERE USER_USERNAME LIKE 'superadmin')";
    ConnectionManager::getInstance()->setQuery($query2);
    return ConnectionManager::getInstance()->query();
}

function countRecordCategory() {
    $query3 = "SELECT COUNT(CAT_ID) AS NUMCAT FROM CATEGORY";
    ConnectionManager::getInstance()->setQuery($query3);
    return ConnectionManager::getInstance()->query();
}

function countRecordDish() {
    $query4 = "SELECT COUNT(DISH_ID) AS NUMDISH FROM DISH";
    ConnectionManager::getInstance()->setQuery($query4);
    return ConnectionManager::getInstance()->query();
}

function countRecordRecruitment() {
    $query5 = "SELECT COUNT(REC_ID) AS NUMREC FROM RECRUITMENT";
    ConnectionManager::getInstance()->setQuery($query5);
    return ConnectionManager::getInstance()->query();
}


?>
